package com.anche.cywebnew.DAO.systemManager;

import com.anche.cywebnew.DTO.ModuleTreeDTO;
import com.anche.cywebnew.Pojo.systemManager.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
    SysUser getUserByLoginName(@Param("loginName") String loginName);

    SysUser getUserById(@Param("id") String id);

    void updateUserById(SysUser sysUser);

    void userFailLogin(SysUser sysUser);

    void userSucessLogin(@Param("loginName") String loginName, @Param("scdlip") String scdlip, @Param("scdlsj") Date scdlsj);

    List<ModuleTreeDTO> getUserPerms(@Param("id") String id);

    List<SysUser> getSysUsers(SysUser sysUser);

    int getUsersCount();

    String selectLoginNameById(@Param("id") String id);

    void insertSysUser(SysUser sysUser);

    void deleteById(String id);

    List<Map<String, String>> getUserPermsUseMap(@Param("id") String id);
}
